/**
 * 随机选取本地图片
 */
export const randomLocalAvatar = (index?:number) => {
  const files = Array.from({ length: 50 }, (v, k) => k + 1).map((i) => `${i}.jpg`);
  if (index) return `/static/avatars/${files[index]}`;
  const randomIndex = Math.floor(Math.random() * files.length);
  return `/static/avatars/${files[randomIndex]}`;
};

/**
 * 随机生成过滤的名称
 */
export const randomName = () => {
  const name =
    '赵钱孙李周吴郑王冯陈褚卫蒋沈韩杨朱秦尤许何吕施张孔曹严华金魏陶姜戚谢邹喻柏水窦章云苏潘葛奚范彭郎鲁韦昌马苗凤花方俞任袁柳酆鲍史唐费廉岑薛雷贺倪汤滕殷罗毕郝邬安常乐于时傅皮卞齐康伍余元卜顾孟平黄刘';
  let main = '';
  main += name[Math.floor(Math.random() * name.length)];
  main += '**';
  return main;
};
